package com.diandi.signature.enums.platfrom;

/**
 * Created by Administrator on 2017/7/6.
 */
public enum NotifyNextTime {
    初始(0,5,"待处理"),
    第一次(1,60,"处理成功"),
    第二次(2,600,"正在处理中"),
    第三次(3,1800,"处理失败"),
    第四次(4,3600,"处理失败"),
    第五次(5,18000,"处理失败"),
    最大次数(6,1000000000,"最大次数"),
    ;
    private int time;
    private int second;
    private String desc;

    NotifyNextTime(int time,int second, String desc) {
        this.time = time;
        this.second = second;
        this.desc = desc;
    }

    public int getSecond() {
        return second;
    }

    public void setSecond(int second) {
        this.second = second;
    }

    public int getTime() {
        return time;
    }

    public void setTime(int time) {
        this.time = time;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static NotifyNextTime getEmun(int time){
        for (NotifyNextTime notifyNextTime : NotifyNextTime.values()) {
            if(notifyNextTime.getTime() == time){
                return notifyNextTime;
            }
        }
        return null;
    }
}
